<!DOCTYPE html>
<html>
    <head>
        <title>Resource Manager tests</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="../src/ObjectContainer.js"></script>
        <script type="text/javascript" src="../src/EventSet.js"></script>
        <script type="text/javascript" src="../src/ResourceLoader.js"></script>
        <script type="text/javascript" src="../src/ResourceManager.js"></script>
        <script type="text/javascript" src="../src/ImageLoader.js"></script>
        <script type="text/javascript" src="../src/ScriptLoader.js"></script>
        <script type="text/javascript" src="../src/AsyncTask.js"></script>
        <script type="text/javascript">
        var rm = new ResourceManager();
        rm.on.manifestLoaded(start.bind(rm));
        
        function start() {
            this.resourceLoader.addLoader('image', new ImageLoader(this.manifest.resources.images));
            this.resourceLoader.addLoader('script', new ScriptLoader(this.manifest.resources.scripts));
            
            var testImage = this.require('image', 'test');
            var testImage2 = this.require('image', 'test2');
            
            //test multiple requests
            this.require('image', 'test2');
            this.require('image', 'test2');
            this.require('image', 'test2');
            this.require('image', 'test2');
            this.require('image', 'test2');
            this.require('image', 'test2');
            this.require('image', 'test2');
            
            //only first is http request
        }
        </script>
    </head>
    <body>
        <div>TODO write content</div>
    </body>
</html>